using System;
using System.Collections;
using System.ComponentModel;
using System.Runtime.Serialization;


namespace Entities
{
    [Serializable]
    [System.Data.Services.Common.DataServiceKey("ID")]
    public class Order:EntityBase
    {
        #region Order Properties
        private System.Int32? _CustomerID;
		[DataMember] public virtual System.Int32? CustomerID
		{
			get
			{
				return _CustomerID;
			}
			set
			{
                if (_CustomerID != value)
                {
                    _CustomerID = value;
                    OnPropertyChanged("CustomerID");
                }
			}
		}
        private System.DateTime? _OrderDate;
		[DataMember] public virtual System.DateTime? OrderDate
		{
			get
			{
				return _OrderDate;
			}
			set
			{
                if (_OrderDate != value)
                {
                    _OrderDate = value;
                    OnPropertyChanged("OrderDate");
                }
			}
		}
        private System.DateTime? _DeliveryDate;
		[DataMember] public virtual System.DateTime? DeliveryDate
		{
			get
			{
				return _DeliveryDate;
			}
			set
			{
                if (_DeliveryDate != value)
                {
                    _DeliveryDate = value;
                    OnPropertyChanged("DeliveryDate");
                }
			}
		}
        private System.String _FullName;
		[DataMember] public virtual System.String FullName
		{
			get
			{
				return _FullName;
			}
			set
			{
                if (_FullName != value)
                {
                    _FullName = value;
                    OnPropertyChanged("FullName");
                }
			}
		}
        private System.String _Address;
		[DataMember] public virtual System.String Address
		{
			get
			{
				return _Address;
			}
			set
			{
                if (_Address != value)
                {
                    _Address = value;
                    OnPropertyChanged("Address");
                }
			}
		}
        private System.String _PayMode;
		[DataMember] public virtual System.String PayMode
		{
			get
			{
				return _PayMode;
			}
			set
			{
                if (_PayMode != value)
                {
                    _PayMode = value;
                    OnPropertyChanged("PayMode");
                }
			}
		}
        private System.String _TransportMode;
		[DataMember] public virtual System.String TransportMode
		{
			get
			{
				return _TransportMode;
			}
			set
			{
                if (_TransportMode != value)
                {
                    _TransportMode = value;
                    OnPropertyChanged("TransportMode");
                }
			}
		}
        private System.Double? _TransportCost;
		[DataMember] public virtual System.Double? TransportCost
		{
			get
			{
				return _TransportCost;
			}
			set
			{
                if (_TransportCost != value)
                {
                    _TransportCost = value;
                    OnPropertyChanged("TransportCost");
                }
			}
		}
        private System.String _Note;
		[DataMember] public virtual System.String Note
		{
			get
			{
				return _Note;
			}
			set
			{
                if (_Note != value)
                {
                    _Note = value;
                    OnPropertyChanged("Note");
                }
			}
		}
        private System.Boolean? _Status;
		[DataMember] public virtual System.Boolean? Status
		{
			get
			{
				return _Status;
			}
			set
			{
                if (_Status != value)
                {
                    _Status = value;
                    OnPropertyChanged("Status");
                }
			}
		}
        private System.DateTime? _CreateDdate;
		[DataMember] public virtual System.DateTime? CreateDdate
		{
			get
			{
				return _CreateDdate;
			}
			set
			{
                if (_CreateDdate != value)
                {
                    _CreateDdate = value;
                    OnPropertyChanged("CreateDdate");
                }
			}
		}
        #endregion
        public override bool Equals(object obj)
        {
            if (obj == this) return true;
            if (obj == null) return false;
            if (obj is Order)
            {
                return (this.ID == (obj as Order).ID);
            }
            return false;
        }
        public override int GetHashCode()
        {
            return ID.GetHashCode();
        }
    }
}